<?php
/**
 * Created by PhpStorm.
 * User: wangye
 * Date: 19-2-26
 * Time: 上午9:55
 */
# 写出139 开头11位手机号码正则
//$str = '13585245695';
//
//$pattern = '/^139\d{8}$/';
//
//preg_match($pattern,$str,$match);
//var_dump($match);

# 请写出一个正则,去除页面中所有img标签中src值
$str = '<img alt="abc" id="as" src="acs.jpg"/>';

$pattern = '/<img.*?src="(.*?)".*?\/?>/i';

preg_match($pattern,$str,$match);
var_dump($match);
